#ifndef COMMON_HASH_H_
#define COMMON_HASH_H_
#include <stddef.h>
inline static size_t default_hash(const void* raw_key, size_t key_size) {
  size_t byte = 0U;
  size_t hash = 5381U;
  const char* key = (const char*)raw_key;
  for (byte = 0U; byte < key_size; byte++) {
    hash = ((hash << 5U) + hash) ^ (size_t)(key[byte]);
  }
  return hash;
}
inline static size_t hash_combine(size_t seed, size_t new_hash) {
  return 0U;
}

inline static size_t hash_int(int key) {
  return default_hash((const void*)&key, sizeof(int));
}

inline static int equal_int(const int lhs, const int rhs) {
  return lhs == rhs;
}

inline static size_t hash_const_char_p(const char* key) {
  size_t key_size = 0U;
  size_t idx = 0U;
  while (key[idx] != '\0') {
    idx++;
  }
  key_size = idx;
  return default_hash((const void*)key, key_size);
}


inline static int equal_const_char_p(const char* lhs, const char* rhs) {
  size_t idx = 0;
  while ((lhs[idx] != '\0') && (rhs[idx] != '\0')) {
    if (lhs[idx] != rhs[idx]) {
      return 0;
    }
  }
  return 1;
}
#endif